package com.tairanchina.md.meeting.constants;

import com.alibaba.fastjson.JSONObject;

/**
 * @description
 * @author xuxw
 * @time 2016年9月8日下午2:05:23
 */
public enum MeetingErrorCode  
{

		
		NO_AWARD_RECORDS("2001","没有该中奖记录"),
	    AWARDED_IS_NULL("2002","今天抽奖次数已经使用完"),
	    AWARDED_SUCCESS("2003","谢谢惠顾"),
	    NOT_GET_AWARDED("2004","没有获得抽奖次数"), 
	    UPDATE_AWARD_FAIL("2005","领奖失败"),
	    UPDATE_AWARDED("2006","已经领过该奖，无需重复领奖"),
	    NOT_SUPPORT_BUSINESS_LUCK("2100","不支持该业务抽奖"),
	    UPDATE_GOODS_FAIL("2101","修改奖品失败"),
	    ADD_GOODS_FAIL("2102","添加奖品失败"),
	    SELECT_GOODS_NULL("2103","没有该奖品的信息"),
	    GOODS_PROB_TOO_BIG("2104","奖品总概率大于100"),
	    AWARDED_NO_NEW("2105","获得的抽奖次数已经使用完，请再次获取抽奖次数才能参与抽奖"),
	    GOODS_NAME_NOT_SAME("2106","抽奖的奖品标题不能与其他奖品相同"),
		LOTTERY_TOO_FAST("2107","抽奖速度太快"),
		LOTTERY_ERROR("2108","没有抽到中奖用户，再抽一次")
	    ;
        private String errorCode;
        private String message;
        MeetingErrorCode(String errorCode,String  message){
        	this.errorCode = errorCode;
        	this.message = message;
        }
        public String toString() {
        	BaseRes error = new BaseRes();
        	error.setCode(Integer.valueOf(errorCode));
        	error.setDescription(message);
            return JSONObject.toJSONString(error);
        }

	public String getErrorCode() {
		return errorCode;
	}

	public void setErrorCode(String errorCode) {
		this.errorCode = errorCode;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}
}


